Skip to content

csup: fix panic in metadataValue#7119

Merged
nwt merged 5 commits into
mainfrom
csup-metadata-panic
Jul 15, 2026
Merged

csup: fix panic in metadataValue#7119
nwt merged 5 commits into
mainfrom
csup-metadata-panic

Conversation

@nwt

@nwt nwt commented Jul 14, 2026

Copy link
Copy Markdown
Member

Fixes #7109.

@nwt nwt requested a review from a team July 14, 2026 17:56
@mattnibs

Copy link
Copy Markdown
Collaborator

I'm still getting the panic from #7109 on this branch.

Here's my simplified repo:

$ echo '{x?:{y:"foo"}}' | super -f csup -o t.csup -
$ super -c 'from t.csup | where x.y = "foo"'
panic: runtime error: invalid memory address or nil pointer dereference
goroutine 1 [running]:
runtime/debug.Stack()
        /opt/homebrew/Cellar/go/1.26.3/libexec/src/runtime/debug/stack.go:26 +0x64
github.com/brimdata/super/runtime/vam/op.(*Catcher).Pull.func1()
        /Users/nibs/Code/super/runtime/vam/op/mux.go:26 +0x34
panic({0x1056ce000?, 0x105b32870?})
        /opt/homebrew/Cellar/go/1.26.3/libexec/src/runtime/panic.go:860 +0x12c
github.com/brimdata/super/csup.metadataValue(0x7a484944000, 0x7a484cdb180, 0x7a484e2f460, 0x84beb7a0?, {0x7a484847bf0, 0x1, 0x1})
        /Users/nibs/Code/super/csup/metadata.go:354 +0xd98
github.com/brimdata/super/csup.metadataValue(0x7a484944000, 0x7a484cdb180, 0x7a484e2f460, 0x7e38e10?, {0x7a484847bc0, 0x1, 0x1})
        /Users/nibs/Code/super/csup/metadata.go:336 +0x994
...

@nwt

nwt commented Jul 14, 2026

Copy link
Copy Markdown
Member Author

@mattnibs: The panic is really fixed now.

@mattnibs

Copy link
Copy Markdown
Collaborator

@nwt the panic is gone but not I'm not getting results from either the o.g. bsky query or my simplified query when they should:

$ super -c 'from t.csup | where x.y = "foo"'

Either way I think we should add a test case to this pr.

@nwt

nwt commented Jul 14, 2026

Copy link
Copy Markdown
Member Author

@mattnibs: I added a test in 1b93edc. The missing output is a separate bug for which I'll have a fix up soon.

@nwt nwt merged commit 7f4c134 into main Jul 15, 2026
2 checks passed
@nwt nwt deleted the csup-metadata-panic branch July 15, 2026 19:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SEGV panic during JSONBench query on CSUP input

2 participants